Skip to content

Conversation

@Robdel12
Copy link
Contributor

@Robdel12 Robdel12 commented Jan 6, 2026

Summary

  • Fixed "Browser exited unexpectedly" error in ember SDK
  • The launcher was hooking into QUnit.done/Mocha end events and immediately calling process.exit(0) when tests completed, before Testem finished collecting results
  • Testem manages the browser lifecycle itself via SIGTERM - the test framework hooks were unnecessary

Changes

  • Remove QUnit/Mocha test completion detection (not needed with Testem)
  • Let Testem control shutdown via signals
  • Add browser crash/disconnect handlers for better error detection
  • Better error logging with stack traces
  • Use VIZZLY_LOG_LEVEL=debug for debug output (consistent with CLI)
  • Exit with code 1 on errors (was always 0)

Test plan

  • Tested with ember-osf-web test suite
  • Single test passes: ember test --filter "url-with-protocol"
  • Full test suite runs without "Browser exited unexpectedly" errors

The launcher was hooking into QUnit.done/Mocha end events and
immediately calling process.exit(0) when tests completed. This
caused "Browser exited unexpectedly" errors because Testem hadn't
finished collecting results yet.

Testem manages the browser lifecycle itself - it sends SIGTERM when
done. The test framework hooks were unnecessary.

Changes:
- Remove QUnit/Mocha test completion detection
- Let Testem control shutdown via signals
- Add browser crash/disconnect handlers
- Better error logging with stack traces
- Use VIZZLY_LOG_LEVEL=debug for debug output (consistent with CLI)
- Exit with code 1 on errors (was always 0)
@Robdel12 Robdel12 enabled auto-merge (squash) January 6, 2026 07:59
@claude

This comment was marked as resolved.

@Robdel12 Robdel12 force-pushed the fix/ember-testem-launcher-lifecycle branch from ccbf307 to 1cb87ca Compare January 6, 2026 08:06
- Await cleanup() in all event handlers to ensure proper resource release
- Remove unused cleanupReason variable
- Add stack trace to main catch block for consistency
@Robdel12 Robdel12 force-pushed the fix/ember-testem-launcher-lifecycle branch from 1cb87ca to a25fe0d Compare January 6, 2026 08:12
@Robdel12 Robdel12 disabled auto-merge January 6, 2026 08:18
@Robdel12 Robdel12 merged commit a3e895c into main Jan 6, 2026
33 of 42 checks passed
@Robdel12 Robdel12 deleted the fix/ember-testem-launcher-lifecycle branch January 6, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants